package com.ruoyi.web.wx.controller;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.disease.domain.Disease;
import com.ruoyi.disease.service.IDiseaseService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "病种")
@RestController
@RequestMapping("/wx/disease")
public class WxDiseaseController {

    @Autowired
    private IDiseaseService diseaseService;

    @ApiOperation("查询疾病详情")
    @GetMapping("/getDiseaseById/{diseaseId}")
    public AjaxResult getDiseaseById(@PathVariable Long diseaseId) {
        return AjaxResult.success(diseaseService.selectDiseaseByDiseaseId(diseaseId));
    }

    @ApiOperation("查询疾病列表")
    @GetMapping("/getDiseaseList")
    public AjaxResult getDiseaseList(Disease disease) {
        return AjaxResult.success(diseaseService.selectDiseaseList(disease));
    }
}
